<html>
  <head>
	<title>8-Bit Music</title>
	
	<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/reset/reset-min.css" />
	<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/fonts/fonts-min.css" />
	<link rel="stylesheet" type="text/css" href="http://x.myspacecdn.com/modules/activity/static/css/activities_tyq3zov4.css" />
	<link rel="stylesheet" type="text/css" href="/stylesheets/main.css" />

	<script type="text/javascript" src="/javascripts/myspaceid.rev.0.js" ></script>
	<!--[if IE]><script type="text/javascript" src="http://remysharp.com/downloads/html5.js"></script><![endif]-->
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" ></script>

  </head>
  <body>

	<script>
	  function closeWin() {
	  //  alert("closeWin() called");
	  //  alert(opener);

	  //window.opener.location.href = "profile.php";
	  //  window.opener.location.reload(true);
	  var rand = Math.random();

	  //alert(rand);

	  window.opener.success(rand);
	  self.close();
	  }
	</script>





    <h1>Finishing Log In</h1>



    <br/>

	<% if flash[:error] %>
	<div class='alert'><%= flash[:error] %></div>
	<% end %>
	<% if @success %>
	<div class='success'>
	  You have successfully verified <a href='<%= @esc_identity %>'><%= @esc_identity %></a> as your identity.
	  <br/><br/>
	  Here's your MySpace profile data fetched using the MySpace REST APIs
	  <% if @cid %>
	  (XRI CanonicalID: <%= CGI.escape(@cid) %>)
	  <% end %>
	</div>
	<% end %>

	<script>closeWin();</script>
  </body>
</html>
